package cn.edu.scau.cmi.chenyiqiu.simpleFactoryMethod;

public class Producer {
	public static Meat getPolicyObj(String type) {
		Meat policy=null;
		if(type.compareTo("Pork")==0)
		policy=new Pork();
		else if(type.compareTo("Chicken")==0)
			policy=new Chicken();
		else if(type.compareTo("Beef")==0)
			policy=new Beef();
		return policy;
	}

}
